#pragma warning(disable:4267)
#pragma warning(disable:4996)
#pragma warning(disable:6031)
#pragma warning(disable:6011)

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>

namespace Y190715_nibl {
int main();

double exp() {
	char s[20];
	scanf("%s", s);
	switch (s[0]) {
	case '+':
		return exp() + exp();
	case '-':
		return exp() - exp();
	case '*':
		return exp() * exp();
	case '/':
		return exp() / exp();
	default:
		return atof(s);
		break;
	}
}

int main() {
	printf("%lf", exp());
	return 0;
}
}

int main_Y190715_nibl() {
	return Y190715_nibl::main();
}
